package com.station.client;

import com.station.client.proxies.PCashOffice;
import com.station.client.proxies.PCoordinates;

public class IncasatorCar extends SimpleCar {

    private PCashOffice cashOffice;
    private double gettingCash;

    public IncasatorCar(PCashOffice cashOffice, PCoordinates coordinates,String fuelType) {
        super(coordinates,fuelType);
        url = "imgs/incasator";
        gettingCash = 0;
        this.cashOffice = cashOffice;
        setQueneNumber(100);
        changeImage();
    }

    @Override
    public boolean isProcFinished() {
        return cashOffice.isEmpty();
    }

    @Override
    public void finishFilling(PCoordinates outPoint, PCoordinates exitPoint) {
        setPriorityTarget(outPoint);
        setTarget(exitPoint);
        setState(State.Standing);
    }

    public double getGettingCash() {
        return gettingCash;
    }

    public void setGettingCash(double gettingCash) {
        this.gettingCash = gettingCash;
    }
}
